package com.itheima.demo04;

public class Test {
    public static void main(String[] args) {

        Dog dog = new Dog();
        Cat cat = new Cat();
        Pig pig = new Pig();
        use(dog);
        use(cat);
        use(pig);
    }

    public static void use(Animal a){
        a.eat();
    }
}
